public class PetDog {
    public String name;
    public String color;

    public void barks() {
        System.out.println(name+"汪汪汪！");
    }
    public void wag() {
        System.out.println(name+"摇尾巴！");
    }
    public static void main(String[] args) {
        PetDog petdog=new PetDog();
        petdog.name="旺财";
        petdog.color="棕色";
        petdog.barks();
        petdog.wag();
    }

}
